export default {
  QTable: {
    vnode: {
      type: 'QTable',
      props: {
        rows: {
          '@computed': '[{a: "a1", b: "b1", c: "c1"},{a: "a2", b: "b2", c: "c2"}]'
        },
        columns: {
          '@computed': '[{label: "A", field: "a", align: "center"},{label: "B", field: "b", align: "center"},{label: "C", field: "c", align: "center"}]'
        }
      }
    },
    label: '表格'
  },
  QBtn: {
    vnodeList: [
      {
        type: 'QBtn',
        props: {label: '普通按钮', color: 'primary'}
      },
      {
        type: 'QBtn',
        props: {label: '文字按钮', color: 'primary', flat: true}
      },
      {
        type: 'QBtn',
        props: {color: 'primary', flat: true, icon: 'card_giftcard'}
      }
    ],
    label: '按钮'
  },
  QInput: {
    vnode: {
      type: 'QInput',
      props: {
        filled: true
      }
    },
    label: '输入框'
  },
  QCard: {
    vnode: {
      type: 'QCard',
      props: {},
      children: [
        {
          type: 'QCardSection',
          children: '卡片内容'
        }
      ]
    },
    label: '卡片'
  },
  QCardSection: {
    vnode: {
      type: 'QCardSection'
    },
    label: '卡片项'
  },
  QEI: {
    vnode: {
      type: 'QList',
      props: {
        class: {'rounded-borders': true},
        bordered: true
      },
      children: [qeis(), qeis()]
    },
    label: '扩展项'
  },


}

function qeis() {
  let item = {
    type: 'QExpansionItem',
    props: {
      'expand-separator': true,
      icon: "perm_identity",
      label: "Account settings",
      caption: "John Doe",
    },
    children: [
      {
        type: 'QCard',
        children: [{
          type: 'QCardSection',
          children: [`Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quidem, eius reprehenderit eos corrupti
                                commodi magni quaerat ex numquam, dolorum officiis modi facere maiores architecto suscipit iste
                                eveniet doloribus ullam aliquid.`]
        }]
      }
    ]
  }
  return item
}
